package com.study.receiver;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Author ldaoliang
 * @Date create in 15:44 2021/3/25
 * @Description
 */
public class ReceiverFactory {

    private static final Logger logger = LoggerFactory.getLogger(ReceiverFactory.class);

    public static Receiver createReceiver(String data){
        //解析消息类型判断创建哪一个处理器
        String[] split = data.split(",");
        String index ="";
        if (split.length<=2){//此处用于设备只上报了制造商名称和imei号的异常上报处理
         logger.info("未上报指令关键字的异常上报："+data);
         return null;
        }else {
            index = split[2];
        }
        return null;
    }




}
